package cn.tedu._05weibo.pojo.dto;



import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


@Data
public class UserRegDTO {
//    @NotNull(message = "用户名不能为空")
//    @NotEmpty(message = "用户名不能为空值或空字符串")
//    @NotBlank(message = "用户名不能为空值或空字符串,且不能为空白串")
    @Pattern(regexp = "^[\\u4e00-\\u9fff]{0,7}[\\w]{0,14}$",message = "用户名不能超过七个汉字或14个字符")
    @ApiModelProperty(value = "用户名",required = true,example = "admin")
    private String username;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
    @ApiModelProperty(value = "密码",required = true)
    private String password;


}
